package gov.chinatax.ctcps.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="DM_JHWZ"
 *     
*/
public class DmJhwz implements Serializable {

    /** identifier field */
    private String jhwzDm;

    /** nullable persistent field */
    private String jhwzMc;

    /** full constructor */
    public DmJhwz(String jhwzDm, String jhwzMc) {
        this.jhwzDm = jhwzDm;
        this.jhwzMc = jhwzMc;
    }

    /** default constructor */
    public DmJhwz() {
    }

    /** minimal constructor */
    public DmJhwz(String jhwzDm) {
        this.jhwzDm = jhwzDm;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="JHWZ_DM"
     *         
     */
    public String getJhwzDm() {
        return this.jhwzDm;
    }

    public void setJhwzDm(String jhwzDm) {
        this.jhwzDm = jhwzDm;
    }

    /** 
     *            @hibernate.property
     *             column="JHWZ_MC"
     *             length="30"
     *         
     */
    public String getJhwzMc() {
        return this.jhwzMc;
    }

    public void setJhwzMc(String jhwzMc) {
        this.jhwzMc = jhwzMc;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("jhwzDm", getJhwzDm())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof DmJhwz) ) return false;
        DmJhwz castOther = (DmJhwz) other;
        return new EqualsBuilder()
            .append(this.getJhwzDm(), castOther.getJhwzDm())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getJhwzDm())
            .toHashCode();
    }

}
